<template>
  <el-card class="avue_height">
    <!-- <el-tabs v-model="keyName" type="card" @tab-click="handleClick">
      <el-tab-pane label="商城首页" name="01"
        ><shangChao ref="shangChao"
      /></el-tab-pane>
      <el-tab-pane label="洗衣首页" name="02"
        ><laundry ref="laundry"
      /></el-tab-pane>
      <el-tab-pane label="家政首页" name="03"
        ><houseKeeping ref="houseKeeping"
      /></el-tab-pane>
    </el-tabs> -->
  </el-card>
</template>

<script>
import shangChao from "@/views/mallHome/shangChao/index.vue";
import laundry from "@/views/mallHome/laundry/index.vue";
import houseKeeping from "@/views/mallHome/houseKeeping/index.vue";

export default {
  name: "Wel",
  components: {
    shangChao,
    laundry,
    houseKeeping,
  },
  data() {
    return {
      keyName: this.$store.getters.indexTab,
    };
  },
  computed: {},
  methods: {
    handleClick() {
      switch (this.keyName) {
        case "01":
          this.$refs.shangChao.getList(); //商超
          break;
        case "02":
          this.$refs.laundry.getList(); //洗衣
          break;
        case "03":
          this.$refs.houseKeeping.getList(); //家政
          break;
        default:
          break;
      }
      this.$store.commit('SET_INDEXTAB', this.keyName)
    },
  },
};
</script>

<style scoped="scoped" lang="scss">
</style>
